import {useState,ChangeEvent} from 'react';

function useInput(initState:string='') {
    let [value,setValue] = useState(initState);
    return {
        value,
        onChange:(e:ChangeEvent) => {
            setValue((e.target as HTMLInputElement).value)
        }
    }
}


export default useInput